﻿using System;
using OpenTK;
using OpenTK.Input;

namespace Pong
{
    class InputController
    {
        public Vector2 Angle;
        public float Zoom;

        public void Update(GameWindow game)
        {       
        
            if (game.Mouse[OpenTK.Input.MouseButton.Left])
            {
                Angle.X = game.Mouse.X;
                Angle.Y = game.Mouse.Y;
            }

            Zoom = game.Mouse.Wheel * 0.5f;

            if ((game.Keyboard[OpenTK.Input.Key.AltLeft] || game.Keyboard[OpenTK.Input.Key.AltRight]) &&
              game.Keyboard[OpenTK.Input.Key.Enter])
                if (game.WindowState != WindowState.Fullscreen)
                    game.WindowState = WindowState.Fullscreen;
                else
                    game.WindowState = WindowState.Normal;
            if (game.Keyboard[OpenTK.Input.Key.Escape])
            {
                game.Exit();
                return;
            }
        }
    }
}